/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基础样式 */
html, body {
  height: 100%;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 14px;
  background: #f5f5f5;
  color: #333;
}

/* 顶部导航栏 */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 0 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar-left {
  font-family: "华文行楷", "楷体", serif;
  font-size: 24px;
  color: #25c6fc;
}

.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.navbar-center a {
  color: #333;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s;
}

.navbar-center a:hover {
  background: #f0f0f0;
  color: #25c6fc;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-right a {
  color: #333;
  text-decoration: none;
  margin-left: 10px;
}

.navbar-right a:hover {
  color: #25c6fc;
}

/* 主内容区 */
.main-content {
  margin-top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 搜索框和卡片宽度统一 */
.search-box, .card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 20px auto;
}

/* 搜索框 */
.search-box {
  display: flex;
}

.search-input {
  flex: 1;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 4px 0 0 4px;
}

.search-btn {
  height: 40px;
  padding: 0 20px;
  background: #25c6fc;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* 卡片美化 */
.card {
  background: rgba(255,255,255,0.85); /* 半透明白色 */
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 30px 30px 20px 30px;
}

/* 表格样式 */
.table-container {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: transparent; /* 表格本身透明 */
}

.table th,
.table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
  background: transparent; /* 单元格透明 */
}

.table th {
  background: rgba(255,255,255,0.7); /* 表头略有区分 */
  font-weight: 500;
}

.table tr:hover {
  background: #f8f9fa;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: #25c6fc;
  color: #fff;
}

.btn-success {
  background: #28a745;
  color: #fff;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* 警告提示 */
.alert {
  padding: 12px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* 模态框 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  text-align: right;
}

/* 响应式 */
@media (max-width: 900px) {
  .search-box, .card {
    max-width: 100%;
  }
  .navbar {
    padding: 0 10px;
  }
}

@media (max-width: 600px) {
  .navbar {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
  }
  .navbar-center {
    flex-direction: column;
    gap: 10px;
  }
  .main-content {
    margin-top: 120px;
  }
  .card {
    padding: 15px;
  }
  .table th,
  .table td {
    padding: 8px 6px;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }

.p-10 { padding: 10px; }
.pt-10 { padding-top: 10px; }
.pb-10 { padding-bottom: 10px; }
.pl-10 { padding-left: 10px; }
.pr-10 { padding-right: 10px; }

/* 背景图片容器 */
.bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* 页面特定样式 */
.reader-page,
.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.book-list,
.reader-list {
  margin-top: 20px;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.pagination li {
  margin: 0 5px;
}

.pagination a {
  display: block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: #f0f0f0;
  border-color: #25c6fc;
  color: #25c6fc;
}

.pagination .active a {
  background: #25c6fc;
  border-color: #25c6fc;
  color: #fff;
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.ml-20 { margin-left: 20px; }
.mr-20 { margin-right: 20px; }

.p-20 { padding: 20px; }
.pt-20 { padding-top: 20px; }
.pb-20 { padding-bottom: 20px; }
.pl-20 { padding-left: 20px; }
.pr-20 { padding-right: 20px; } 